import random

scores = []
num = {}
for i in range(1000):
    scores.append(random.randrange(20, 100))
scores.sort()
for i in scores:
    counts = scores.count(i)
    num[i] = counts

print('数字       出现次数')
for key in num:
    print('%s       %s' %(key, num[key]))